#!/usr/local/bin/python
# -*- coding: utf-8 -*-
from PyQt5 import Qt
from PyQt5.QtGui import QBrush, QColor

#################################################################
# 账单解析规则添加对话框进行初始化配置
#################################################################

# 收支表页面表格配置
ALIPAY_BILL_ROW_COUNT = 19
ALIPAY_BILL_COLUMN_CONTEXT = ["序号", "收/支", "交易对方", "对方账号", "商品说明",
                                "收/付款方式", "金额", "交易状态", "交易分类", "交易订单号",
                                "商家订单号", "交易时间"]
ALIPAY_BILL_COLUMN_COUNT = len(ALIPAY_BILL_COLUMN_CONTEXT)
ALIPAY_BILL_COLUMN_KEY =     ["id", "income_expenses", "trade_object", "trade_account", "trade_description",
                                "receipt_pay_type", "value", "trade_status", "trade_type", "trade_order_no",
                                "business_order_no", "trade_time"]

NEW_ALIPAY_BILL_ROW_COUNT = 19
NEW_ALIPAY_BILL_COLUMN_CONTEXT = ["序号", "交易时间", "支付结算时间","交易分类", "支付类型_B",  #”支付时间“为“最近修改时间_B”
                                "收&支", "金额", "收/付款方式", "交易状态_B","交易对方",
                                "商品说明","备注","交易订单号", "商家订单号", "对方账号",
                                "交易订单号&交易号_B", "商家订单号_B", "交易创建时间_B", "付款时间_B", "最近修改时间_B",
                                "交易来源地_B", "交易对方_B", "商品名称_B", "金额_B", "收&支_B",
                                "交易状态_A", "服务费（元）_B", "成功退款（元）_B", "备注_B", "资金状态_B"]
NEW_ALIPAY_BILL_COLUMN_COUNT = len(NEW_ALIPAY_BILL_COLUMN_CONTEXT)
NEW_ALIPAY_BILL_COLUMN_KEY =     ["id", "trade_time_first", "settlement_time", "trade_type_first", "type_other",
                                "income_expenses_first", "value_first", "receipt_pay_type_first", "trade_status_other", "trade_object_first",
                                "commodity_description_first", "remark_first", "trade_order_no_first", "business_order_no_first", "trade_account_first",
                                "trade_order_no_other", "business_order_no_other", "trade_create_time_other", "trade_payment_time_other",  "trade_last_modified_time_other",
                                "trade_source_other", "trade_object_other", "commodity_name_other", "value_other", "income_expenses_other",
                                "trade_status_first", "value_service_charge_other", "value_refund_other", "remark_other", "fund_status_other "]  #暂时没有用,没有更新到最新



NEW_ALIPAY_BILL_COLUMN_COUNT_OTHER = 16


ALIPAY_VOUCHER_PREVIEW_ROW_COUNT = 19
ALIPAY_VOUCHER_PREVIEW_COLUMN_CONTEXT = ["编号", "摘要", "日期",
                                "金额", "详情", ]
ALIPAY_VOUCHER_PREVIEW_COLUMN_COUNT = len(ALIPAY_VOUCHER_PREVIEW_COLUMN_CONTEXT)

#处理归并蚂蚁花呗记账凭证
HUA_BEI_SUBJECT = "权属->负债->蚂蚁花呗"
MERGE_HUA_BEI_SUMMARY = "【负债】蚂蚁花呗负债消费(自动生成)"

#处理归并余额宝收益记账凭证
YU_E_BAO_SUBJECT = "权属->自有->本年结余->投资->余额宝投资"
MERGE_YU_E_BAO_SUMMARY = "【收入】余额宝收益"

#处理归并余额宝收益记账凭证
PENG_HUA_SUBJECT = "资产->投资->理财->鹏华丰禄债券基金"
MERGE_PENG_HUA_SUMMARY = "【投资】鹏华丰禄债券基金投资"


#默认类型
ALIPAY_GENERAL_VOUCHER_TYPE = "ALIPAY_GENERAL_VOUCHER_TYPE"
#蚂蚁花呗消费类型
ALIPAY_HUABEI_VOUCHER_TYPE = "ALIPAY_HUABEI_VOUCHER_TYPE"
#余额宝收益类型
ALIPAY_YUEBAO_EARNINGS_VOUCHER_TYPE = "ALIPAY_YUEBAO_EARNINGS_VOUCHER_TYPE"
#鹏华基金投资类型
ALIPAY_PENGHUA_BOND_VOUCHER_TYPE = "ALIPAY_PENGHUA_BOND_VOUCHER_TYPE"


#账单类型
NORMAL_BILL_TYPE="正常账单"
CLOSE_BILL_TYPE="关闭交易账单"   #新的功能不再使用这个标记了
UNUSUAL_BILL_TYPE="异常账单"
INVALID_BILL_TYPE="无效账单"


UNNORMAL_BILL_BACKGROUND_COLOUR = QBrush(QColor(0xff, 0xcc, 0x66))
#MARK_BILL_TEXT_COLOUR =QBrush(QColor(0xbb, 0xff, 0xff))
MARK_BILL_TEXT_COLOUR =QBrush(QColor(0x1E, 0x90, 0xFF))


#支付宝账单类型
ALIPAY_BILL_TYPE_1_2022 = 1   #标记2022年支付宝账单格式类型
ALIPAY_BILL_TYPE_2_2023 = 2   #标记2023年支付宝账单格式类型


#支付宝账单分类
ALIPAY_BILL_HUABEI = "花呗"  #账单中涉及花呗的消费
ALIPAY_BILL_LARGE_VALUE = 200  #账单中金额超过200的账单
ALIPAY_BILL_LITTLE_LARGE_VALUE = 50  #账单中金额超过200的账单

#用于Radio筛选按钮，这部分标签不在数据库中记录，按照规则查询时按照条件筛选
ALL_BILL_RADIO_TYPE = "ALL_BILL_TYPE"  #所有账单
HUA_BEI_BILL_RADIO_TYPE = "HUA_BEI_BILL_TYPE" #花呗账单
CASH_BILL_RADIO_TYPE = "CASH_BEI_BILL_TYPE" #现金账单
LARGE_BILL_RADIO_TYPE= "LARGE_BILL_TYPE" #大额账单
UNUSUAL_BILL_RADIO_TYPE ="UNUSUAL_BILL_TYPE" #异常账单类型
INVALID_BILL_RADIO_TYPE ="INVALID_BILL_TYPE" #无效账单类型

#账单类型
BILL_TYPE_REAL_TIME_TRADING="即时到账交易"
BILL_TYPE_CREDIT_TRADING="支付宝担保交易"
